module.exports = {
  value: {
    type: [String, Object, Array],
    default: '',
    name: '输入值',
    filedType: 'value'
  },

  labelWidth: {
    type: String,
    default: '100',
    name: '标签宽度',
    filedType: 'string'
  },
  labelPosition: {
    type: String,
    default: 'right',
    name: '标签对齐方式',
    filedType: 'select',
    options: [
      {
        name: '左对齐',
        value: 'left'
      },
      {
        name: '右对齐',
        value: 'right'
      },
      {
        name: '顶部对齐',
        value: 'top'
      }
    ]
  },
  size: {
    type: String,
    default: 'medium',
    name: '输入框尺寸',
    filedType: 'select',
    options: [
      {
        name: '小尺寸',
        value: 'small'
      },
      {
        name: '中尺寸',
        value: 'medium'
      },
      {
        name: 'mini',
        value: 'mini'
      }
    ]
  },

  color: {
    type: String,
    default: '#333',
    name: '文本颜色',
    filedType: 'color'
  },

  bgColor: {
    type: String,
    default: '#ffffff',
    name: '背景色',
    filedType: 'color'
  },

  borderColor: {
    type: String,
    default: '#e4e7ed',
    name: '边框色',
    filedType: 'color'
  },

  focusBorderColor: {
    type: String,
    default: '#409EFF',
    name: '聚焦边框色',
    filedType: 'color'
  },

  list: {
    type: Array,
    default () {
      return [
        {
          type: 'hidden',
          name: '',
          key: '196_805655',
          model: 'hidden_id',
          options: {
            defaultValue: '111',
            customClass: 'hidden'
          },
          rules: []
        },
        {
          type: 'text',
          icon: 'icon-wenzishezhi-',
          options: {
            defaultValue: 'This is a text',
            customClass: 'fff'
          },
          name: '文字',
          key: '196_80561',
          model: 'text_196_80561',
          rules: []
        },
        {
          type: 'grid',
          icon: 'icon-grid-',
          columns: [
            {
              span: 12,
              list: [
                {
                  type: 'editor',
                  icon: 'icon-fuwenbenkuang',
                  options: {
                    defaultValue: '请输入内容',
                    width: ''
                  },
                  name: '编辑器',
                  key: '364_82056',
                  model: 'editor_zhangsan',
                  rules: []
                }
              ]
            },
            {
              span: 12,
              list: [
                {
                  type: 'input',
                  icon: 'icon-input',
                  options: {
                    width: '100%',
                    defaultValue: '',
                    required: false,
                    dataType: 'string',
                    pattern: '',
                    placeholder: '',
                    disabled: false
                  },
                  name: '单行文本jiaoyan',
                  key: '400_63462',
                  model: 'input_400_63462',
                  rules: [
                    { validator: 'validatePass', trigger: 'blur' }
                  ]
                },
                {
                  type: 'imgupload',
                  icon: 'icon-tupian',
                  options: {
                    defaultValue: [],
                    limit: '5',
                    maxsize: '2M',
                    closeAlert: false,
                    listtype: 'text',
                    disabled: false,
                    placeholder: '<span style="padding: 0px 20px;">+ 作品上传</span>',
                    multiple: false,
                    showfilelist: false,
                    accept: '',
                    tips: '<div style=\"width:100%;text-align:left;\">温馨提示：上传作品附件的数量不能为0； 上传作品要求：支持.docx .doc .wps .pdf .txt,.xlsx .xls .et .jpg .jpeg .bmp .png .gif .swf .rar .zip格式文件； 文件大小不超过5M。</div>',
                    useCustFilelist: true,
                    useCustFileicon: true,
                    drag: false,
                    autoupload: true
                  },
                  name: '图片',
                  key: '374_81198',
                  model: 'imgupload_374_81198',
                  rules: []
                }
              ]
            }
          ],
          options: {
            gutter: 0,
            justify: 'start',
            customClass: '',
            align: 'top'
          },
          name: '栅格布局',
          key: '362_69968',
          model: 'grid_362_69968',
          rules: []
        },
        {
          type: 'input',
          icon: 'icon-input',
          options: {
            width: '100%',
            defaultValue: '',
            required: false,
            dataType: 'string',
            pattern: '',
            placeholder: '',
            disabled: false
          },
          name: '单行文本aaa',
          key: '167_20591',
          model: 'input_167_20591',
          rules: [
            {
              type: 'email',
              message: '单行文本格式不正确'
            },
            {
              required: true,
              message: '单行文本必须填写'
            },
            // {
            //   pattern: '/^[1-9]\d*$/',
            //   message: '正则'
            // },
            { validator: 'valida', trigger: 'blur' }
          ]
        },
        {
          type: 'textarea',
          icon: 'icon-diy-com-textarea',
          options: {
            width: '100%',
            defaultValue: '',
            required: false,
            disabled: false,
            pattern: '',
            placeholder: ''
          },
          name: '多行文本',
          key: '169_99407',
          model: 'textarea_169_99407',
          rules: []
        },
        {
          type: 'number',
          icon: 'icon-number',
          options: {
            width: '',
            required: false,
            defaultValue: 0,
            min: 0,
            max: 0,
            step: 1,
            disabled: false,
            controlsPosition: ''
          },
          name: '计数器',
          key: '170_10731',
          model: 'number_170_10731',
          rules: []
        },
        {
          type: 'radio',
          icon: 'icon-radio-active',
          options: {
            inline: false,
            defaultValue: '',
            showLabel: false,
            options: [
              {
                value: 'Option 1',
                label: 'Option 1'
              },
              {
                value: 'Option 2',
                label: 'Option 2'
              },
              {
                value: 'Option 3',
                label: 'Option 3'
              }
            ],
            required: false,
            width: '',
            props: {
              value: 'value',
              label: 'label'
            },
            disabled: false
          },
          name: '单选框组',
          key: '172_64111',
          model: 'radio_172_64111',
          rules: []
        },
        {
          type: 'checkbox',
          icon: 'icon-check-box',
          options: {
            inline: false,
            defaultValue: [],
            showLabel: false,
            options: [
              {
                value: 'Option 1'
              },
              {
                value: 'Option 2'
              },
              {
                value: 'Option 3'
              }
            ],
            required: false,
            width: '',
            props: {
              value: 'value',
              label: 'label'
            },
            disabled: false
          },
          name: '多选框组',
          key: '174_3299',
          model: 'checkbox_174_3299',
          rules: []
        },
        {
          type: 'time',
          icon: 'icon-time',
          options: {
            defaultValue: '',
            readonly: false,
            disabled: false,
            editable: true,
            clearable: true,
            placeholder: '',
            startPlaceholder: '',
            endPlaceholder: '',
            isRange: false,
            arrowControl: true,
            format: 'HH:mm:ss',
            required: false,
            width: ''
          },
          name: '时间选择器',
          key: '176_25825',
          model: 'time_176_25825',
          rules: []
        },
        {
          type: 'date',
          icon: 'icon-date',
          options: {
            defaultValue: '',
            readonly: false,
            disabled: false,
            editable: true,
            clearable: true,
            placeholder: '',
            startPlaceholder: '',
            endPlaceholder: '',
            type: 'date',
            format: 'yyyy-MM-dd',
            timestamp: false,
            required: false,
            width: ''
          },
          name: '日期选择器',
          key: '178_40474',
          model: 'date_178_40474',
          rules: []
        },
        {
          type: 'rate',
          icon: 'icon-pingfen1',
          options: {
            defaultValue: 0,
            max: 5,
            disabled: false,
            allowHalf: false,
            required: false
          },
          name: '评分',
          key: '180_64729',
          model: 'rate_180_64729',
          rules: []
        },
        {
          type: 'color',
          icon: 'icon-color',
          options: {
            defaultValue: '',
            disabled: false,
            showAlpha: false,
            required: false
          },
          name: '颜色选择器',
          key: '186_5697',
          model: 'color_186_5697',
          rules: []
        },
        {
          type: 'select',
          icon: 'icon-select',
          options: {
            defaultValue: '',
            multiple: false,
            disabled: false,
            clearable: false,
            placeholder: '',
            required: false,
            showLabel: false,
            width: '',
            options: [
              {
                value: 'Option 1'
              },
              {
                value: 'Option 2'
              },
              {
                value: 'Option 3'
              }
            ],
            filterable: false,
            props: {
              value: 'value',
              label: 'label'
            }
          },
          name: '下拉选择框',
          key: '188_6169',
          model: 'select_188_6169',
          rules: []
        },
        {
          type: 'switch',
          icon: 'icon-switch',
          options: {
            defaultValue: false,
            required: false,
            disabled: false
          },
          name: '开关',
          key: '191_2933',
          model: 'switch_191_2933',
          rules: []
        },
        {
          type: 'slider',
          icon: 'icon-slider',
          options: {
            defaultValue: 0,
            disabled: false,
            required: false,
            min: 0,
            max: 100,
            step: 1,
            showInput: false,
            range: false,
            width: ''
          },
          name: '滑块',
          key: '193_76096',
          model: 'slider_193_76096',
          rules: []
        },
        {
          type: 'imgupload',
          icon: 'icon-tupian',
          options: {
            defaultValue: [],
            limit: '5',
            maxsize: '2M',
            closeAlert: false,
            listtype: 'text',
            disabled: false,
            placeholder: '<span style="padding: 0px 20px;">+ 作品上传</span>',
            multiple: false,
            showfilelist: false,
            accept: '',
            tips: '<div style=\"width:100%;text-align:left;\">温馨提示：上传作品附件的数量不能为0； 上传作品要求：支持.docx .doc .wps .pdf .txt,.xlsx .xls .et .jpg .jpeg .bmp .png .gif .swf .rar .zip格式文件； 文件大小不超过5M。</div>',
            useCustFilelist: true,
            useCustFileicon: true,
            drag: false,
            autoupload: true
          },
          name: '图片',
          key: '200_3073',
          model: 'imgupload_200_3073',
          rules: []
        },
        {
          type: 'cascader',
          icon: 'icon-jilianxuanze',
          options: {
            defaultValue: [],
            width: '',
            placeholder: '',
            disabled: false,
            clearable: false,
            options: [{
              value: 'zhinan',
              label: '指南',
              children: [{
                value: 'shejiyuanze',
                label: '设计原则',
                children: [{
                  value: 'yizhi',
                  label: '一致'
                }, {
                  value: 'fankui',
                  label: '反馈'
                }, {
                  value: 'xiaolv',
                  label: '效率'
                }, {
                  value: 'kekong',
                  label: '可控'
                }]
              }, {
                value: 'daohang',
                label: '导航',
                children: [{
                  value: 'cexiangdaohang',
                  label: '侧向导航'
                }, {
                  value: 'dingbudaohang',
                  label: '顶部导航'
                }]
              }]
            }, {
              value: 'zujian',
              label: '组件',
              children: [{
                value: 'basic',
                label: 'Basic',
                children: [{
                  value: 'layout',
                  label: 'Layout 布局'
                }, {
                  value: 'button',
                  label: 'Button 按钮'
                }]
              }, {
                value: 'form',
                label: 'Form',
                children: [{
                  value: 'radio',
                  label: 'Radio 单选框'
                }, {
                  value: 'form',
                  label: 'Form 表单'
                }]
              }, {
                value: 'data',
                label: 'Data',
                children: [{
                  value: 'table',
                  label: 'Table 表格'
                }, {
                  value: 'tag',
                  label: 'Tag 标签'
                }, {
                  value: 'badge',
                  label: 'Badge 标记'
                }]
              }, {
                value: 'notice',
                label: 'Notice',
                children: [{
                  value: 'alert',
                  label: 'Alert 警告'
                }, {
                  value: 'loading',
                  label: 'Loading 加载'
                }, {
                  value: 'notification',
                  label: 'Notification 通知'
                }]
              }, {
                value: 'navigation',
                label: 'Navigation',
                children: [{
                  value: 'menu',
                  label: 'NavMenu 导航菜单'
                }, {
                  value: 'tabs',
                  label: 'Tabs 标签页'
                }, {
                  value: 'breadcrumb',
                  label: 'Breadcrumb 面包屑'
                }, {
                  value: 'dropdown',
                  label: 'Dropdown 下拉菜单'
                }, {
                  value: 'steps',
                  label: 'Steps 步骤条'
                }]
              }, {
                value: 'others',
                label: 'Others',
                children: [{
                  value: 'dialog',
                  label: 'Dialog 对话框'
                }, {
                  value: 'tooltip',
                  label: 'Tooltip 文字提示'
                }, {
                  value: 'popover',
                  label: 'Popover 弹出框'
                }, {
                  value: 'card',
                  label: 'Card 卡片'
                }, {
                  value: 'carousel',
                  label: 'Carousel 走马灯'
                }, {
                  value: 'collapse',
                  label: 'Collapse 折叠面板'
                }]
              }]
            }, {
              value: 'ziyuan',
              label: '资源',
              children: [{
                value: 'axure',
                label: 'Axure Components'
              }, {
                value: 'sketch',
                label: 'Sketch Templates'
              }, {
                value: 'jiaohu',
                label: '组件交互文档'
              }]
            }],
            props: {
              value: 'value',
              label: 'label',
              children: 'children'
            }
          },
          name: '级联选择器',
          key: '205_99396',
          model: 'cascader_205_99396',
          rules: []
        },
        {
          type: 'editor',
          icon: 'icon-fuwenbenkuang',
          options: {
            defaultValue: '',
            disabled: false,
            width: ''
          },
          name: '编辑器',
          key: '202_64264',
          model: 'editor_202_64264',
          rules: []
        },
        {
          type: 'grid',
          icon: 'icon-grid-',
          childType: 'dymFrom',
          mulforms: [{
            list: [{
              type: 'text',
              icon: 'icon-wenzishezhi-',
              options: {
                defaultValue: 'A 卷',
                customClass: 'xfrmtitle',
                notdel: true,
                autoadd: true
              },
              name: '',
              key: '196_80561',
              model: 'grid_text_1',
              rules: []
            }, {
              type: 'input',
              icon: 'icon-input',
              options: {
                width: '100%',
                defaultValue: '',
                required: false,
                dataType: 'string',
                pattern: '',
                placeholder: '',
                disabled: false
              },
              name: '',
              key: '167_0591',
              model: 'grid_input_1',
              rules: [{
                required: true,
                message: '单行文本必须填写'
              }]
            }, {
              type: 'date',
              icon: 'icon-date',
              options: {
                defaultValue: '',
                readonly: false,
                disabled: false,
                editable: true,
                clearable: true,
                placeholder: '',
                startPlaceholder: '',
                endPlaceholder: '',
                type: 'daterange',
                format: 'yyyy-MM-dd',
                timestamp: false,
                required: false,
                width: '',
                notdel: true,
                autoadd: true
              },
              name: '',
              key: '178_40474',
              model: 'grid_date_1',
              rules: []
            }, {
              type: 'imgupload',
              icon: 'icon-tupian',
              options: {
                defaultValue: [{
                  "fileId": "200000001209",
                  "fileName": "组件分类.xlsx",
                  "localPath": "/CXY0001/2021/3/12/xlsx/054a0967-e4be-4e5b-bb20-c2fdffb0217e.xlsx",
                  "size": 10729,
                  "format": "xlsx",
                  "md5": "911781ce090cab7607c690c9500a5d58",
                  "createTime": null,
                  "lastModifyTime": null,
                  "tenantId": "CXY0001",
                  "type": null,
                  "status": "1",
                  "width": 0,
                  "height": 0,
                  "length": 0,
                  "lastAccessTime": null,
                  "exist": false,
                  "fileNamePrefix": "054a0967-e4be-4e5b-bb20-c2fdffb0217e"
              }],
                limit: '5',
                maxsize: '2M',
                closeAlert: false,
                listtype: 'text',
                disabled: false,
                placeholder: '<span style="padding: 0px 20px;">+ 作品上传</span>',
                multiple: false,
                showfilelist: false,
                accept: 'jpg, xlsx',
                tips: '<div style=\"width:100%;text-align:left;\">温馨提示：上传作品附件的数量不能为0； 上传作品要求：支持.docx .doc .wps .pdf .txt,.xlsx .xls .et .jpg .jpeg .bmp .png .gif .swf .rar .zip格式文件； 文件大小不超过5M。</div>',
                useCustFilelist: true,
                useCustFileicon: true,
                drag: false,
                autoupload: true
              },
              name: '',
              key: '374_81198',
              model: 'grid_imgupload_1',
              rules: []
            }]
          }],
          options: {
            defaultValue: [{
              grid_text_1: '',
              grid_input_1: '',
              grid_date_1: '',
              grid_imgupload_1: []
            }],
            btnDisabled: false,
            btnLabel: '添加试卷',
            btnHtml: '',
            btnType: 'primary',
            btnLimit: '5',
            btnIcon: 'el-icon-plus',
            delBtnIcon: 'el-icon-delete',
            delBtnHtml: '',
          },
          name: '动态表单',
          key: '212_76l611',
          model: 'grid_111',
          rules: []
        },
        {
          type: 'mulinput',
          childType: 'input',
          icon: 'icon-input',
          options: {
            width: '90%',
            defaultValue: [''],
            required: false,
            dataType: 'string',
            pattern: '',
            placeholder: '',
            disabled: false,
            btnDisabled: false,
            btnPlain: true,
            btnLabel: '新增目录',
            btnHtml: '',
            btnType: 'success',
            btnLimit: '5',
            btnIcon: 'el-icon-plus',
            delBtnIcon: 'el-icon-delete',
            delBtnHtml: ''
          },
          name: '动态增加',
          key: '167_20591',
          model: 'mulinput',
          hiddenmodel: 'hiddeninput',
          rules: [{
            required: true,
            message: '单行文本必须填写'
          }]
        },
        {
          type: 'hidden',
          name: '',
          key: '196_805652',
          model: 'hiddeninput',
          options: {
            defaultValue: ['123'],
            customClass: 'hidden'
          },
          rules: []
        }
      ]
    },
    name: '表单列表',
    filedType: 'api'
  },
  custClass: {
    type: String,
    default: '',
    name: '自定义Class',
    filedType: 'string'
  },
  setCusStyle: {
    type: Function,
    default: '',
    name: '自定义样式',
    nameTip: '函数的返回值是样式字串',
    filedType: 'function'
  },
  custValidFunc: {
    type: Function,
    default: '',
    name: '自定义校验规则',
    nameTip: '函数的返回值是函数rule, value, callback, val',
    filedType: 'function'
  },
  submitBtn: {
    type: Boolean,
    default: false,
    name: '显示提交按钮',
    filedType: 'switch'
  },

  // 上传参数
  action: {
    type: String,
    default: 'http://192.168.102.224/api/twasp/fs/fs/file/upload',
    name: '上传的地址',
    filedType: 'sync'
  },
  withcredentials: {
    type: Boolean,
    default: false,
    name: '支持发送cookie凭证信息',
    filedType: 'switch'
  },
  icons: {
    type: Array,
    default () {
      return []
    },
    name: '文件类型icons列表',
    nameTip: '0other,1jpg,2doc,3xls,4ppt,5pdf,6txt,7zip,8mp4',
    filedType: 'file',
    limit: 100,
    maxSize: 1024
  },
  beforeUpload: {
    type: Function,
    default: '',
    name: '上传前置函数',
    filedType: 'function'
  },
  beforeRemove: {
    type: Function,
    default: '',
    name: '删除文件之前',
    filedType: 'function'
  },
  onPreview: {
    type: Function,
    default: '',
    name: '文件列表预览',
    filedType: 'function'
  },
  onRemove: {
    type: Function,
    default: '',
    name: '文件列表移除',
    filedType: 'function'
  },
  onSuccess: {
    type: Function,
    default: '',
    name: '文件上传成功',
    filedType: 'function'
  },
  onError: {
    type: Function,
    default: '',
    name: '文件上传失败',
    filedType: 'function'
  },
  onProgress: {
    type: Function,
    default: '',
    name: '文件上传过程',
    filedType: 'function'
  },
  onExceed: {
    type: Function,
    default: '',
    name: '文件超出个数限制',
    filedType: 'function'
  },
  onChange: {
    type: Function,
    default: '',
    name: '上传change函数',
    filedType: 'function'
  },
  autoAddFunc: {
    type: Function,
    default: '',
    name: '增加表单定制函数',
    nameTip: '模型名称model, 当前索引index, 表单参数option, 返回值models',
    filedType: 'function'
  },
  submitFunc: {
    type: Function,
    default: '',
    name: '提交函数',
    filedType: 'function'
  },
  resetFunc: {
    type: Function,
    default: '',
    name: '重置函数',
    filedType: 'function'
  },
}
